<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ taglib prefix="s" uri="/struts-tags"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://" + request.getServerName() + ":" + request.getServerPort()
			+ path + "/";
%>
<link href="style/style.css" rel="stylesheet" type="text/css">
<link href="style/global.css" rel="stylesheet" type="text/css">
<script type="text/javascript" src="<%=basePath%>/js/global.js"></script>
<!--如用到jquery jbox必须引入 -->
<jsp:include page="/jqueryInclude.jsp" />
<div class="rightCon" align="center">
	<div class="rightTitle" align="left">
		<h3>
			<s:property value="nav" escape="false" />
		</h3>
	</div>
	<table class="listTable">
		<tr class="listTitle">
			<td width="4%" align="center" valign="middle" class="title2">
				序号
			</td>
			<td width="15%" align="center" valign="middle" class="title2">
				角色名称
			</td>
			<td width="25%" align="center" valign="middle" class="title2">
				角色代码
			</td>
			<td width="20%" align="center" valign="middle" class="title2">
				角色描述
			</td>
			<td align="center" valign="middle" class="title2">
				操作
			</td>
		</tr>
		<s:iterator id="role" value="%{list}" status="stuts">
			<tr>
				<td align="center" valign="middle">
					<s:property value="#stuts.count" />
				</td>
				<td align="center" valign="middle">
					<s:property value="#role.name" />
				</td>
				<td align="center" valign="middle">
					<s:property value="#role.code" />
				</td>
				<td align="center" valign="middle">
					<s:property value="#role.note" />
				</td>
				<td align="center" valign="middle" class="add">
					<a href="roleUser.do?action=before&role.id=<s:property value="#role.id" />"><img src="images/menus/selectors/user_16.gif" alt="角色人员" />
					</a>
					<a href="roleRight.do?action=before&role.id=<s:property value="#role.id" />"><img src="images/btn/system/grant.gif" alt="授权" />
					</a>
					<!--  <a href="roleArea.do?action=before&role.id=<s:property value="#role.id" />"><img src="images/btn/system/grant.gif" alt="区域权限" />
					</a>-->
					<a href="rolePortal.do?action=before&role.id=<s:property value="#role.id" />"><img src="images/btn/system/portal.gif" alt="桌面" />
					</a>
					<a href="updateRole.do?action=before&role.id=<s:property value="#role.id" />"><img src="images/system/edit.gif" alt="修改" />
					</a>
					<s:if test="#role.type==0">
						<a href="javascript:if(confirm('您真的要删除吗?点击确认进行删除！否则请点取消'))window.location='delRole.do?role.id=<s:property value="#role.id" />'"><img src="images/system/delete.gif" alt="删除" />
						</a>
					</s:if>
				</td>
			</tr>
		</s:iterator>
	</table>
	<table width="92%" border="0" align="center" cellpadding="0" cellspacing="0">
		<tr>
			<td width="52%" height="38">
				<a href="addRole.do?action=before" class="search button01">添加</a>
				<a onclick="jBox.open('div-jBoxID','div','search1','按条件查询','width=700,height=160,center=true,minimizable=true,resize=false,draggable=true,model=false');" href="javascript://" class="search button01">查询</a>
			</td>
			<td width="48%" align="right">
				<span style="text-align: center">${pageStr}</span>
			</td>
		</tr>
	</table>
</div>
<div id="search1" style="display: none;">
	<form method="post" action="listRole.do">
		<table width="97%" border="0" align="center" cellpadding="5" class="searchtb" cellspacing="0">
			<tr>
				<td valign="top">
					<table width="98%" border="0" align="center" cellpadding="1" cellspacing="1">
						<tr>
							<td width="25%" align="right" height="30">
								角色名称：
							</td>
							<td width="20%" align="left">
								<s:textfield name="role.name" title="角色名称" cssClass="text"></s:textfield>
							</td>
							<td width="15%" align="right">
								角色代码：
							</td>
							<td width="50%" align="left">
								<s:textfield name="role.code" title="角色代码" cssClass="text"></s:textfield>
							</td>
						</tr>
						<tr>
							<td width="30%" align="center" colspan="4" class="maintb1">
								<center>
									<input id="button2" type="submit" value="查看" />
									&nbsp;&nbsp;&nbsp;&nbsp;
									<input id="button2" type="reset" value="重置" />
								</center>
							</td>
						</tr>
					</table>
				</td>
			</tr>
		</table>
	</form>
</div>